EfEntityFormatter
class EfEntityFormatter
Wraps an entity using an EntityMetadataWrapper.
Bundle specific subclasses are generated using EfEntityFormatter as a base class.
Methods
Set the language to be used. Please note that EntityMetadataWrapper always falls back to the language of the entity, if a field is not available in a given language.
Retrieve the EntityMetadataWrapper object.
Retrieve the wrapped entity.
Retrieve the entity ID
Returns an URL to the detail page of this entity.
Retrieve the entity label
Details
at line 44
__construct($entity_type, stdClass|int $entity)
Wrap an entity.
at line 66
setLanguage($language_prefix)
Set the language to be used. Please note that EntityMetadataWrapper always falls back to the language of the entity, if a field is not available in a given language.
See https://www.drupal.org/node/2453287 and https://www.drupal.org/node/2335357
at line 75
EntityMetadataWrapper
entityMetadataWrapper()
Retrieve the EntityMetadataWrapper object.
at line 84
mixed
entity()
Retrieve the wrapped entity.
at line 93
int
id()
Retrieve the entity ID
at line 103
string
url(array $options = array())
Returns an URL to the detail page of this entity.
at line 113
string
label()
Retrieve the entity label